#ifndef ITGOP_PATCHER_H_INCLUDED_
#define ITGOP_PATCHER_H_INCLUDED_

#include "PatcherOptions.h"

namespace itgoggpatch
{

// A Patcher takes options including a list of files/directories to patch, and can be run.
class Patcher
{
private:
	PatcherOptions m_options;
	bool m_completedWithoutErrors;

public:
	// Creates a new patcher with the given options.
	explicit Patcher(const PatcherOptions& options) : m_options(options), m_completedWithoutErrors(true)
	{
	}

	// Runs the patcher. No exceptions are thrown other than bad_alloc and such.
	// As such, there's no way to know how many or what types of errors occurred.
	// Errors are printed to stdout.

	/// <summary>Some summary text.</summary>
	bool Patch();

private:
	void LengthPatchDirectory(const lhcutils::UnicodeString& directory);
	void LengthPatchFile(const lhcutils::UnicodeString& file);
};

}

#endif

/*
 Copyright 2011 Greg Najda

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
